tests: For installed, s/test-/itest-/ to avoid in-tree name clashes
authorColin Walters <walters@verbum.org>
Mon, 8 May 2017 15:20:32 +0000 (11:20 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 9 May 2017 15:08:26 +0000 (15:08 +0000)
I want to migrate `test-pull-many.sh` → `itest-pull.sh`, hence not
conflicting with the unit test `test-pull.sh.

Closes: #840
Approved by: jlebon

tests/installed/itest-bare-root.sh [new file with mode: 0755]
tests/installed/itest-deploy-selinux.sh [new file with mode: 0755]
tests/installed/run.sh
tests/installed/test-bare-root.sh [deleted file]
tests/installed/test-deploy-selinux.sh [deleted file]

diff --git a/tests/installed/itest-bare-root.sh b/tests/installed/itest-bare-root.sh
new file mode 100755 (executable)
index 0000000..0d384c2
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# Tests of the "raw ostree" functionality using the host's ostree repo as uid 0.
+
+set -xeuo pipefail
+
+dn=$(dirname $0)
+. ${dn}/libinsttest.sh
+
+echo "1..2"
+
+cd /ostree/repo/tmp
+rm co -rf
+rm co-testref -rf
+ostree refs --delete testref
+ostree checkout -H ${host_refspec} co
+victim_symlink=/usr/bin/gtar  # Seems likely to stick around
+# Copy the link to avoid corrupting it
+cp co/${victim_symlink}{,.tmp}
+mv co/${victim_symlink}{.tmp,}
+# Add another xattr to a symlink and a directory, since otherwise this is unusual
+setfattr -n security.biometric -v iris co/${victim_symlink}
+setfattr -n security.crunchy -v withketchup co/usr/bin
+csum=$(ostree commit -b testref --link-checkout-speedup --tree=dir=co)
+ostree fsck
+ostree ls -X testref ${victim_symlink} > ls.txt
+assert_file_has_content ls.txt 'security.biometric'
+ostree ls -X ${host_refspec} ${victim_symlink} > ls.txt
+assert_not_file_has_content ls.txt security.biometric
+ostree ls -X testref usr/bin > ls.txt
+assert_file_has_content ls.txt 'security.crunchy'
+
+ostree checkout -H testref co-testref
+getfattr -n security.biometric co-testref/${victim_symlink} > xattr.txt
+assert_file_has_content xattr.txt 'security.biometric="iris"'
+getfattr -n security.crunchy co-testref/usr/bin > xattr.txt
+assert_file_has_content xattr.txt 'security.crunchy="withketchup"'
+
+rm co -rf
+rm co-testref -rf
+
+echo "ok xattrs"
diff --git a/tests/installed/itest-deploy-selinux.sh b/tests/installed/itest-deploy-selinux.sh
new file mode 100755 (executable)
index 0000000..c4965f8
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Verify our /etc merge works with selinux
+
+set -xeuo pipefail
+
+dn=$(dirname $0)
+. ${dn}/libinsttest.sh
+
+# Create a new deployment
+ostree admin deploy --karg-proc-cmdline ${host_refspec}
+new_deployment_path=/ostree/deploy/${host_osname}/deploy/${host_commit}.1
+
+# A set of files that have a variety of security contexts
+for file in fstab passwd exports hostname sysctl.conf; do
+    current=$(cd /etc && ls -Z ${file})
+    new=$(cd ${new_deployment_path}/etc && ls -Z ${file})
+    assert_streq "${current}" "${new}"
+done
+
+ostree admin undeploy 0
index 3c60a6e2f5fbf9f7bdc768d482b071b1d3e3dce2..02e1a7f968df99a5419e8f85e1270876417786a8 100755 (executable)
@@ -3,7 +3,7 @@
 set -xeuo pipefail
 
 dn=$(dirname $0)
-for tn in ${dn}/test-*.sh; do
+for tn in ${dn}/itest-*.sh; do
     echo Executing: ${tn}
     ${tn}
 done
diff --git a/tests/installed/test-bare-root.sh b/tests/installed/test-bare-root.sh
deleted file mode 100755 (executable)
index 0d384c2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-# Tests of the "raw ostree" functionality using the host's ostree repo as uid 0.
-
-set -xeuo pipefail
-
-dn=$(dirname $0)
-. ${dn}/libinsttest.sh
-
-echo "1..2"
-
-cd /ostree/repo/tmp
-rm co -rf
-rm co-testref -rf
-ostree refs --delete testref
-ostree checkout -H ${host_refspec} co
-victim_symlink=/usr/bin/gtar  # Seems likely to stick around
-# Copy the link to avoid corrupting it
-cp co/${victim_symlink}{,.tmp}
-mv co/${victim_symlink}{.tmp,}
-# Add another xattr to a symlink and a directory, since otherwise this is unusual
-setfattr -n security.biometric -v iris co/${victim_symlink}
-setfattr -n security.crunchy -v withketchup co/usr/bin
-csum=$(ostree commit -b testref --link-checkout-speedup --tree=dir=co)
-ostree fsck
-ostree ls -X testref ${victim_symlink} > ls.txt
-assert_file_has_content ls.txt 'security.biometric'
-ostree ls -X ${host_refspec} ${victim_symlink} > ls.txt
-assert_not_file_has_content ls.txt security.biometric
-ostree ls -X testref usr/bin > ls.txt
-assert_file_has_content ls.txt 'security.crunchy'
-
-ostree checkout -H testref co-testref
-getfattr -n security.biometric co-testref/${victim_symlink} > xattr.txt
-assert_file_has_content xattr.txt 'security.biometric="iris"'
-getfattr -n security.crunchy co-testref/usr/bin > xattr.txt
-assert_file_has_content xattr.txt 'security.crunchy="withketchup"'
-
-rm co -rf
-rm co-testref -rf
-
-echo "ok xattrs"
diff --git a/tests/installed/test-deploy-selinux.sh b/tests/installed/test-deploy-selinux.sh
deleted file mode 100755 (executable)
index c4965f8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-# Verify our /etc merge works with selinux
-
-set -xeuo pipefail
-
-dn=$(dirname $0)
-. ${dn}/libinsttest.sh
-
-# Create a new deployment
-ostree admin deploy --karg-proc-cmdline ${host_refspec}
-new_deployment_path=/ostree/deploy/${host_osname}/deploy/${host_commit}.1
-
-# A set of files that have a variety of security contexts
-for file in fstab passwd exports hostname sysctl.conf; do
-    current=$(cd /etc && ls -Z ${file})
-    new=$(cd ${new_deployment_path}/etc && ls -Z ${file})
-    assert_streq "${current}" "${new}"
-done
-
-ostree admin undeploy 0